package com.weijin.bookborrowmanagesystem.mapper;

import com.weijin.bookborrowmanagesystem.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/13 10:09
 */
@Mapper
public interface UserMapper {
    @Insert("insert into t_user(name,role) values (#{name},#{role})")
    int insert(User user);

    @Select("select * from t_user where user_id = #{id}")
    User selectById(@Param("id") int id);
}
